﻿using System.Net;
namespace EvincePayroll.Utility
{
    public class MailSending
    {
        public static string host = "mail.evincedev.com";
        public static string from = "info@evincedev.com";
        public static string password = "p@ssw0rd";
        public static int port =2626;
        public static int timeout = 30000;
        
        public void SendMail(string toAddress,string subject,string body)
        {
            var smtp = new System.Net.Mail.SmtpClient();
            {
                smtp.Host = host;
                smtp.Port = port;
                smtp.EnableSsl = false;
                smtp.DeliveryMethod = System.Net.Mail.SmtpDeliveryMethod.Network;
                smtp.Credentials = new NetworkCredential(from,password);
                smtp.Timeout = timeout;
            }
            smtp.Send(from, toAddress, subject, body);
        }
    }
}
